﻿#ifndef AUDIOCONVERTER_H
#define AUDIOCONVERTER_H

#include <QObject>
#include <QString>
extern "C"
{
    #include <libavformat/avformat.h>
    #include <libavcodec/avcodec.h>
    #include <libswresample/swresample.h>
};

class AudioConverter : public QObject
{
    Q_OBJECT
public:
    explicit AudioConverter(QObject *parent = nullptr);
    ~AudioConverter();
    bool pcmToWav(const QString &inputFile, const QString &outputFile,int sampleRate,int channelNum,int bitDepth);
    bool convertToWav(const QString &inputFile, const QString &outputFile);

private:
//    AVFormatContext *inputFormatCtx;
//    AVCodecContext *decoderCtx;
//    AVCodecContext *encoderCtx;
//    SwrContext *swrCtx;
//    AVFormatContext *outputFormatCtx;
};

#endif // AUDIOCONVERTER_H
